﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Web;
using WcfServicePush.Model;
using System.Data;

namespace WcfServicePush.Service.Contract
{
    [ServiceContract]
    interface IPush
    {
        /// <summary>
        /// 验证服务是否可用
        /// </summary>
        [OperationContract]
        [WebGet(UriTemplate = "/verify?data={data}", ResponseFormat = WebMessageFormat.Json)]
        string verify(string data);

        #region 推送相关
        /// <summary>
        /// 发起推送（自定义消息）
        /// </summary>
        [OperationContract]
        [WebInvoke(UriTemplate = "/reqPush", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        Boolean reqPush(BaseModel model);

        /// <summary>
        /// 测试推送服务
        /// </summary>
        [OperationContract]
        [WebGet(UriTemplate = "/reqPushTest?alias={alias}", ResponseFormat = WebMessageFormat.Json)]
        string reqPushTest(string alias);

        #endregion
    }
}
